


        var mySwiper = new Swiper('.swiper-container', {
            slidesPerView: 1,
            spaceBetween: 0,
            pagination: {
                el: '.swiper-pagination',
                type: 'custom',//自定义-分页器样式类型（前提）
                //设置自定义分页器的内容
                paginationClickable :true,
                renderCustom: function (swiper, current, total) {
                    var _html = '';
                    var t = "";
                    for (var i = 1; i <= total; i++) {
                        t = '0.' + i;
                        if (current == i) {
                            _html += '<li class="swiper-pagination-custom swiper-pagination-custom1 active">' + t + '</li>';
                        } else {
                            _html += '<li class="swiper-pagination-custom swiper-pagination-custom2">' + t + '</li>';
                        }
                    }
                    return _html;//返回所有的页码html
                }
            }
        });
        
        var mySwiper1 = new Swiper ('.swiper-container1', {
            speed:300,
            direction: 'vertical',

        })

        var mySwiper2 = new Swiper ('.swiper-container2', {
            speed:300,
            direction: 'vertical',
            controller: {
                control: mySwiper1,
            },
        })

        var mySwiper3 = new Swiper ('.swiper-container3', {
            speed:300,
            direction: 'vertical',
            controller: {
                control: mySwiper2,
            },
            on: {
                slideChangeTransitionEnd: function(){
                    $(".pc_nav span").removeClass("active");
                    $(".pc_nav span").eq(this.activeIndex).addClass("active");
                },
            },
        })
        
        // mySwiper3.controller.control = [mySwiper1, mySwiper2]

        $(document).ready(function(){
            $(".quick-nav li a").click(function () {
                $(".quick-nav li a").removeClass("active");
                $(this).addClass("active");
            })
            //$(".video-box video").css("height", $(".video-box video").width() / 1.775);
        
            $(".pc_nav span").click(function(e){
                if (e && e.stopPropagation) {//非IE浏览器
                    e.stopPropagation();
                }
                else {//IE浏览器
                    window.event.cancelBubble = true;
                }
                $(".pc_nav span").removeClass("active");
                $(this).addClass("active");
                var index_ = $(".pc_nav span").index(this);
                mySwiper3.slideTo(index_, 1000, false);//切换到第一个slide，速度为1秒
            })
            //给每个页码绑定跳转的事件
            $('.swiper-pagination-custom').on('click','li',function () {
                var index = $(this).index() + 1;
                mySwiper.slideTo(index - 1, 500, false);//切换到第一个slide，速度为1秒
            })
        
            var count1 = $(".counter1").attr("number");
            var number_1 = 0;
            var t1;
            var count2 = $(".counter2").attr("number");
            var number_2 = 0;
            var t2;
            var count3 = $(".counter3").attr("number");
            var number_3 = 0;
            var t3;
            var count4 = $(".counter4").attr("number");
            var number_4 = 0;
            var t4;
            $(window).on("scroll", function () {
                if (($(".numbers").offset().top - $(this).scrollTop() + 100) < $(this).height()) {
                    t1 = window.setInterval(function () {
                        number_1 += 200;
                        $(".counter1").html(number_1);
                        if (number_1 >= count1) {
                            $(".counter1").html(count1);
                            window.clearInterval(t1);
                        }
                    }, 100);
                    t2 = window.setInterval(function () {
                        number_2 += 15;
                        $(".counter2").html(number_2);
                        if (number_2 >= count2) {
                            $(".counter2").html(count2);
                            window.clearInterval(t2);
                        }
                    }, 100);
                    t3 = window.setInterval(function () {
                        number_3 += 15;
                        $(".counter3").html(number_3);
                        if (number_3 >= count3) {
                            $(".counter3").html(count3);
                            window.clearInterval(t3);
                        }
                    }, 100);
                    t4 = window.setInterval(function () {
                        number_4 += 14;
                        $(".counter4").html(number_4);
                        if (number_4 >= count4) {
                            $(".counter4").html(count4);
                            window.clearInterval(t4);
                        }
                    }, 100);
                }
            })
        
            $(window).on("scroll", function () {
                if (($(".people").offset().top - $(this).scrollTop() + 100) < $(this).height()) {
                    var index13 = 0;
                    var addClassOn13;
                    addClassOn13 = setInterval(function () {
                        if (index13 >= $(".numbers .number").length) {
                            window.clearInterval(addClassOn13);
                            return false
                        } else {
                            $(".numbers .number").eq(index13).addClass("animated fadeInUp").css("opacity", 1);
                            index13++
                        }
        
                    }, 300);
                }
            })
        
            $(window).on("scroll", function () {
                if (window.pageYOffset > 800) {
                    $('.scroll-up').css('display', 'block')
                } else {
                    $('.scroll-up').css('display', 'none')
                }
            })
            $(window).on("scroll", function () {
                if (window.pageYOffset > 1630) {
                    $(".scroll-down").css('margin-top', '190px')
                } else {
                    $(".scroll-down").css('margin-top', '72px')
                }
            })
            $('.scroll-up').click(function () { $('html,body').animate({ scrollTop: '0px' }, 800); });
        
            $('.video-box').click(function () {
                $(this).find(".play-btn").addClass("active");
                $(this).find("video").attr("controls", 'controls');
                $(this).find("video")[0].play();
                $(this).find("video")[0].onended = function () {
                    $(this)[0].load();
                    $(this).parent().find(".play-btn").removeClass("active");
                    $(this).removeAttr("controls");
                }
            })
        
            $(window).on("scroll",function(){
                if(window.pageYOffset+window.innerHeight - $('.boxes').offset().top > 946 ){
                    $('.quick-nav').addClass('back');
                }else{
                    $('.quick-nav').removeClass('back');
                }
            })
        
        })